package com.foreknow.oppExer1.exer9;

/**
 * @author shkstart
 * @create 2021-07-28 14:48
 */
public class Employee {
    private String name;  //姓名
    private double salary;  //薪资
    private double balance;  //余额

    public Employee() {
    }

    public Employee(String name, double balance) {
        this.name = name;
        this.balance =0;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }


    public double getBalance() {
        return balance+=salary;
    }

    public void setBalance(double balance) {
        this.balance=balance;
    }
}
